const BASE_URL = 'http://120.55.74.21:8840/'
export const myRequest = (options) =>{
	return new Promise(() =>{
		uni.request({
			url:BASE_URL + options.url,
			method:options.method || 'GET',
			
			data:options.data || {},
			success: (res) =>{
				if (res.data.status !== 0) {
					return uni.showToast({
						title:'获取数据失败'
					})
				}
				resolve(res)
			},
			fail:(err)=>{
				uni.showToast({
					title:'接口请求失败'
				})
				reject(err)
			}
		})
	})
}